﻿Imports Microsoft.VisualBasic

Public Class DBDeductionSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public DeductionID As New TableField("DeductionID", Data.SqlDbType.Int)
    Public PaymentVoucherID As New TableField("PaymentVoucherID", Data.SqlDbType.Int)
    Public Year As New TableField("Year", Data.SqlDbType.Int)
    Public AccountNo As New TableField("AccountNo", Data.SqlDbType.NVarChar)
    Public ProgramNo As New TableField("ProgramNo", Data.SqlDbType.NVarChar)
    Public ProjectNo As New TableField("ProjectNo", Data.SqlDbType.NVarChar)
    Public Amount As New TableField("Amount", Data.SqlDbType.Float)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "DeductionSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal DeductionID As String = "", _
                                 Optional ByVal PaymentVoucherID As String = "", _
                                 Optional ByVal Year As String = "", _
                                 Optional ByVal AccountNo As String = "", _
                                 Optional ByVal ProgramNo As String = "", _
                                Optional ByVal ProjectNo As String = "", _
                                 Optional ByVal Amount As String = "", _
                                 Optional ByVal Remarks As String = "") As Object
        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.DeductionID.SetValue(DeductionID, MyBase.FieldsArrayList)
        Me.PaymentVoucherID.SetValue(PaymentVoucherID, MyBase.FieldsArrayList)
        Me.Year.SetValue(Year, MyBase.FieldsArrayList)
        Me.AccountNo.SetValue(AccountNo, MyBase.FieldsArrayList)
        Me.ProgramNo.SetValue(ProgramNo, MyBase.FieldsArrayList)
        Me.ProjectNo.SetValue(ProjectNo, MyBase.FieldsArrayList)
        Me.Amount.SetValue(Amount, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
